package models;

import java.io.Serializable;
import java.util.Date;

/**
 * Created with IntelliJ IDEA.
 * User: Артемка
 * Date: 15.12.13
 * Time: 17:28
 * To change this template use File | Settings | File Templates.
 */
public class Student implements Serializable{
    private String name;
    private String surname;
    private String patronymic;
    private Group group;
    private Date date;
    private int id;

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return this.name;
    }

    public void setSurname(String surname) {
        this.surname = surname;
    }

    public String getSurname() {
        return this.surname;
    }

    public void setPatronymic(String patronymic) {
        this.patronymic = patronymic;
    }

    public String getPatronymic() {
        return this.patronymic;
    }

    public void setGroup(Group group) {
        this.group = group;
    }

    public Group getGroup() {
        return this.group;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public Date getDate() {
        return this.date;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getId() {
        return this.id;
    }

    @Override
    public boolean equals(Object object) {
        if (object != null) {
            Student st = (Student) object;
            if (this.getName().equals(st.getName()) && this.getSurname().equals(st.getSurname()) &&
                    this.getPatronymic().equals(st.getPatronymic()) && this.getGroup().equals(st.getGroup())) {
                return true;
            } else
                return false;
        } else
            return false;
    }
}
